//
//  GNRDataStore.h
//  UUIM
//
//  Created by LvYuan on 2017/4/5.
//  Copyright © 2017年 UUPaotui. All rights reserved.
//

#import "GNRObject.h"
#import "GNRProfileInfoParam.h"
#import "GNRMarkInfoParam.h"
#import "TMNetError.h"

//获取个人信息
typedef void(^GNRProfileInfoBlock)(GNRProfileInfoParam * profileInfo,BOOL success,TMNetError * error);
//获取积分等信息
typedef void(^GNRMarkInfoBlock)(GNRMarkInfoParam * markInfo,BOOL success,TMNetError * error);

@interface GNRDataStore : GNRObject

//本地缓存
@property (nonatomic, copy) NSString * UserName;
@property (nonatomic, copy) NSString * UserPwd;
@property (nonatomic, assign)BOOL isLogin;

//内存缓存
@property(nonatomic,strong)GNRProfileInfoParam * profileParam;//个人信息
@property(nonatomic,strong)GNRMarkInfoParam * markInfoParam;//积分时间信息

+ (instancetype)store;

+ (void)clear;

/*****  有缓存  *****/

/**
 获取个人信息 cache 是否读缓存
 */
+ (void)getProfileInfoCompletion:(GNRProfileInfoBlock)completion cache:(BOOL)cache;

/**
 获取个人积分等 cache 是否读缓存
 */
+ (void)getMarkInfoCompletion:(GNRMarkInfoBlock)completion cache:(BOOL)cache;

@end
